package edu.yctc.manage.controller.rest;

import edu.yctc.manage.entity.ResultDO;
import edu.yctc.manage.service.ImportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @ClassName ImportRestController
 * @Description TODO
 * @Author zyj
 * @Date 2021/3/31 18:40
 * @Version 1.0
 **/
@RestController
@RequestMapping("admin/manage/import")
public class ImportRestController {

    @Autowired
    private ImportService importService;

    @PostMapping("import-score")
    public ResultDO importScore(@RequestBody MultipartFile multipartFile) {
        importService.ImportScore(multipartFile);
        return ResultDO.ok();
    }
}
    